import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'

const router = createRouter({
  // history: createWebHashHistory(),
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      component: () => import('@/components/Layout.vue'),
      redirect: '/home',
      children: [
        {
          path: '/home',
          component: () => import('@/views/home/home.vue'),
        },
        {
          path: '/community',
          component: () => import('@/views/community/community.vue'),
        },
        {
          path: '/qrcode',
          component: () => import('@/views/qrcode/qrcode.vue'),
        },
        {
          path: '/people',
          component: () => import('@/views/people/people.vue'),
        },
        {
          path: '/naTest',
          component: () => import('@/views/naTest/index.vue'),
        },
        {
          path: '/returnTown',
          component: () => import('@/views/returnTown/index.vue'),
        },
        {
          path: '/query',
          component: () => import('@/views/query/query.vue'),
        },
      ],
    },
  ],
})

export default router
